while (1)
    stat = getStatus(2)
    pause(0.5);
end